package com.lzh.cli.command;

import com.lzh.model.MainTemplateConfig;
import picocli.CommandLine;

import java.lang.reflect.Field;

/**
 * @author lzh
 * @version 1.0
 * @date 2025/3/30
 */
@CommandLine.Command(name = "config", mixinStandardHelpOptions = true)
public class ConfigCommand implements Runnable {

    @Override
    public void run() {
        Class<MainTemplateConfig> mainTemplateConfigClass = MainTemplateConfig.class;
        Field[] declaredFields = mainTemplateConfigClass.getDeclaredFields();
        for (Field declaredField : declaredFields) {
            System.out.println("字段类型：" + declaredField.getType().getSimpleName());
            System.out.println("字段名称：" + declaredField.getName());
            System.out.println("-------------");
        }
    }

}
